package com.g1.gzbooksingle.controller;


import com.g1.gzbooksingle.model.DgIndexMenu;
import com.g1.gzbooksingle.service.IDgIndexMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 图书分类类目表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2021-09-28
 */
@Slf4j
@Api(tags = "图书分类类目接口")
@RestController
@RequestMapping("/gzbooksingle/dgIndexMenu")
public class DgIndexMenuController {
    @Autowired
    private IDgIndexMenuService dgIndexMenuService;

    public DgIndexMenuController() {
    }

    @PostMapping("/list")
    @ApiOperation("获取所有分类的树状目录")
    public List<DgIndexMenu> list() {
        List<DgIndexMenu> list = dgIndexMenuService.selectDgIndexMenuList();
        return list;
    }

}
